<template>
  <div class="select-address-box">
    <iframe :key="saParams.productCode" v-once :src="src" frameborder="0"></iframe>
  </div>
</template>
<script>
export default {
  name: 'SelectAddress',
  data() {
    return {
      src:''
    };
  },
  props: {
    saParams:{
      type: Object
    },
  },
  mounted() {},
  created() {
    this.src = '//10.141.136.40:10000/crmgis?token='+this.saParams.token+'&addressNum='+this.saParams.addressNum+'&productCode='+this.saParams.productCode+'&userInfo='+this.saParams.userInfo;
    // this.src = '//10.128.75.215:8192?token='+this.saParams.token+'&addressNum='+this.saParams.addressNum+'&productCode='+this.saParams.productCode+'&userInfo='+this.saParams.userInfo;
    // 接受子页面发来的信息
    var this_com = this;
    window.addEventListener('message',function(e){
      
      let addressesList = e.data.data.addressesList;
      
      this_com.$emit('selValueFun',{addressesList:addressesList,dk:this_com.saParams.dk});
      this_com.$emit('update:show',false);
    },false);
  },
  components: {},
  methods: {
  },
};
</script>

<style lang="scss" scoped>
.select-address-box{
  height: 84vh;
  iframe {
    height: 100%;
    width: 100%;
  }
}
</style>
